import os
import onnxruntime
# Load CUDA DLLs from system installation
cuda_path = os.path.join(os.environ["CUDA_PATH"], "bin")
onnxruntime.preload_dlls(cuda=True, cudnn=False, directory=cuda_path)

# Load cuDNN DLLs from NVIDIA site package
onnxruntime.preload_dlls(cuda=False, cudnn=True, directory="F:\\public\\cuda\\cudnn97\\bin\\12.8")

# Print debug information
onnxruntime.print_debug_info()
import torch
print(torch.__version__)  # 输出若含"cpu"则为CPU版本，如 "1.13.0+cpu"